//
//  CustomLabel.h
//  Etion
//
//  Created by wu jingxing on 12-7-10.
//  Copyright (c) 2012年 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "UIViewExtend.h"

#import <CoreText/CoreText.h>

@interface NSAttributedString (CaleSize)

- (CGSize)attributedStringSize:(CGSize)containSize;

@end

#define     CustomAttributeStringKeyLinkSection        @"CustomAttributeStringKeyLinkSection"

#define     CustomAttributeStringKeyImage               @"CustomAttributeStringKeyImage"

#define     CustomAttributeStringKeyButton              @"CustomAttributeStringKeyButton"


@class CStaticTextLabel;

@protocol CStaticTextLabelDelegate <NSObject>

@optional

- (void)staticTextLabelClick:(CStaticTextLabel *)label;

- (void)staticTextLabelLinkSectionClick:(CStaticTextLabel *)label sectionRange:(NSRange)range text:(NSString *)text;

@end

typedef enum
{
    ECustomLabelClickTypeNormal,
    ECustomLabelClickTypeZoomInOut
} ECustomLabelClickType;

@interface CStaticTextLabel : UILabel <UIViewExtendDelegate>
{
}

@property(nonatomic, assign) id <CStaticTextLabelDelegate> delegate;

@property(nonatomic, assign) ECustomLabelClickType clicktype;

/**
 *  作用与attributedText一样，只是支持ios5以上版本
 */
@property(nonatomic, retain) NSAttributedString *attributedString;

- (CGSize)attributedStringSize;

@end
